
var app = getApp();

Page({
  data : {
    user : {},
    tuns : []
  },
 
  onLoad : function(){
    this.loadUserInfo();
    const that = this;
    wx.getStorage({
      key: 'tuns',
      success: function(res) {
        if(res.data.length > 0){
          that.setData({ tuns : res.data})
        }
      }
    })
    console.log(that.data.tuns)
  },
  onShow : function(){
    
  },
  onReady: function () {

  },
  loadUserInfo : function(){
    var ui = app.globalData.userInfo;
    this.data.user = ui;
    
    this.data.user.identy = '尊敬的VIP客户';
    this.data.user.images = ui.avatarUrl;
    const userFinal = this.data.user;
    this.setData({ user: userFinal});
    console.log(userFinal)
  }

})